<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			var n=window.prompt();
			//var reg=/\d/g;
			var reg=/(red|blue|green|gray)/gi;
			n=n.replace(reg,'红色');
			alert(n);
		</script>
	</head>
	<body>
	</body>
</html>
